import Vue from 'vue'
import Router from 'vue-router'
import Main from '../components/blog/main.vue'
import Archives from '../components/archives.vue'
import LeaveComments from '../components/comment/leave_comments.vue'
import Link from '../components/link.vue'
import About from '../components/about/about.vue'
import Article from '../components/blog/article.vue'
import BlogByCategory from '../components/blog/blog_by_category.vue'
import BlogByKeywords from '../components/blog/blog_by_keywords.vue'
import Treasure from '../components/treasure/treasure.vue'


Vue.use(Router)

export default new Router({
  //mode: 'history',  //使访问地址后面不会自动加上#/
  routes: [
    { //主页
      path: '/',
      name: 'Main',
      component:Main
    },
    { //归档
      path: '/archives',
      name: 'Archives',
      component:Archives
    },
    { //留言
      path: '/leave_comments',
      name: 'LeaveComments',
      component:LeaveComments
    },
    { //友链
      path: '/link',
      name: 'Link',
      component:Link
    },
    { //关于
      path: '/about',
      name: 'About',
      component:About
    },
    { //文章详情
      path: '/article',
      name: 'Article',
      component:Article
    },
    { //按类别博客列表
      path: '/blogByCategory',
      name: 'Blog_By_Category',
      component:BlogByCategory
    },
    { //按关键字博客列表
      path: '/blogByKeywords',
      name: 'Blog_By_Keywords',
      component:BlogByKeywords
    },
    { //有趣的板块
      path: '/treasure',
      name: 'Treasure',
      component:Treasure
    }
  ]
})
